package com.example.demo.entity;

import cn.hutool.json.JSONUtil;
import lombok.Data;

/**
 * 蔡定努
 * 2025/05/13 16:58
 */
@Data
public class MenuView {
    private Integer id;

    private String name;

    private Integer parentId;

    private Integer userId;

    private String content;
    
    private Boolean isLeaf;


    public static void main(String[] args) {
        String s = "{\n" +
                "  \"id\": 0,\n" +
                "  \"name\": \"name_ce64a58d0479\",\n" +
                "  \"parentId\": 0,\n" +
                "  \"userId\": 0,\n" +
                "  \"content\": \"content_f54bef316558\",\n" +
                "  \"isLeaf\": 0\n" +
                "}";

        MenuView bean = JSONUtil.toBean(s, MenuView.class);


        System.out.println(bean);
    }
}
